package com.xsomnus.java_basic.collection;


import java.util.ArrayList;
import java.util.List;

/**
 * @author 003387_xiawenye
 * @since 2019/10/18 18:01:10
 */
public class AlibabaGuideTest {

    public static void main(String[] args) {
    switchTest();
    }

    private static void listRemove() {
        List<String> list = new ArrayList<>();

        list.add("1");
        list.add("2");

        for (String item :
                list) {
            if ("2".equals(item)) {
                list.remove(item);
            }
        }

        System.out.println(list);
    }


    private static void switchTest() {
        method(null);
    }

    public static void method(String param) {
        switch (param) {
        // 肯定不是进入这里
            case "sth":
                System.out.println("it's sth");
                break;
// 也不是进入这里
            case "null":
                System.out.println("it's null");
                break;
// 也不是进入这里
            default:
                System.out.println("default");
        }
    }
}
